package com.example.testglide;

import android.app.Activity;
import android.os.Bundle;
import android.provider.ContactsContract;
import android.widget.GridView;
import android.widget.ImageView;
import android.widget.ListView;

import androidx.annotation.Nullable;

import com.bumptech.glide.Glide;

public class TestGlide extends Activity {
    GridView gv;
    Mybaseadp myadp;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.ly_testglide);

//        ImageView iv_img = (ImageView) findViewById(R.id.iv_img);
//        Glide.with(this.getApplicationContext()).load(
//                "http://cst.qdu.edu.cn/__local/E/53/78/E4301A41E234B96C0D06F9F12D7_6AADC796_DEB5D.png"
//        ).timeout(15000).into(iv_img);

        String []urls = {
            "http://cst.qdu.edu.cn/__local/E/53/78/E4301A41E234B96C0D06F9F12D7_6AADC796_DEB5D.png",
            "http://cst.qdu.edu.cn/__local/6/A7/BA/627F2C89EDDDA53677406C29994_E8571138_D341C.png",
                "http://cst.qdu.edu.cn/__local/7/9E/55/3DE9B8F38DDDE767E15D68E9CAF_A866DAAA_2CD32.png",
                "http://cst.qdu.edu.cn/__local/2/29/18/F3B57BFF63F3D2788563ECBA27B_815B9B5D_39E7F.png",
                "http://cst.qdu.edu.cn/__local/5/F2/C2/A09899D62ED193C30E56A50EBDA_8BA257A8_3B849.png",
                "http://cst.qdu.edu.cn/__local/5/C2/14/F9ED3870999CE663EDF285BAF24_3E50C44F_30C7A.png",
                "http://cst.qdu.edu.cn/__local/7/E3/C6/7A4B54AEB51E1A2EB492A726F62_3ED93572_42250.png"
        };

        myadp = new Mybaseadp(urls);

        gv = (GridView)findViewById(R.id.gv_img);
        gv.setAdapter(myadp);
    }
}
